package com.xuanrui.commons.enums;

/**
 * @author afeng
 * @version 1.0
 * @date 2023/2/21 下午1:44
 */
public enum PayTypeEnum {
    WECHAT_PUBLIC(0, "微信公众号支付"),
    ALI_PAY(1, "支付宝支付"),

    ;

    private int type;
    private String desc;

    PayTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getPayTypeDesc(int type) {

        for (GameTypeEnum var : GameTypeEnum.values()) {
            if (type == var.getType())
                return var.getDesc();
        }
        return "微信公众号支付";
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
